package com.study.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the depotgoodsshelfs database table.
 * 
 */
@Entity
@Table(name="depotgoodsshelfs")
@NamedQuery(name="Depotgoodsshelf.findAll", query="SELECT d FROM Depotgoodsshelf d")
public class Depotgoodsshelf implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int dgsnum;

	private String dgsname;

	private String dgstype;

	private int swnum;

	//bi-directional many-to-one association to Depotgood
	@OneToMany(mappedBy="depotgoodsshelf")
	private List<Depotgood> depotgoods;

	//bi-directional many-to-one association to Inst
	@OneToMany(mappedBy="depotgoodsshelf")
	private List<Inst> insts;

	//bi-directional many-to-one association to Scheduleform
	@OneToMany(mappedBy="depotgoodsshelf")
	private List<Scheduleform> scheduleforms;

	public Depotgoodsshelf() {
	}

	public int getDgsnum() {
		return this.dgsnum;
	}

	public void setDgsnum(int dgsnum) {
		this.dgsnum = dgsnum;
	}

	public String getDgsname() {
		return this.dgsname;
	}

	public void setDgsname(String dgsname) {
		this.dgsname = dgsname;
	}

	public String getDgstype() {
		return this.dgstype;
	}

	public void setDgstype(String dgstype) {
		this.dgstype = dgstype;
	}

	public int getSwnum() {
		return this.swnum;
	}

	public void setSwnum(int swnum) {
		this.swnum = swnum;
	}

	public List<Depotgood> getDepotgoods() {
		return this.depotgoods;
	}

	public void setDepotgoods(List<Depotgood> depotgoods) {
		this.depotgoods = depotgoods;
	}

	public Depotgood addDepotgood(Depotgood depotgood) {
		getDepotgoods().add(depotgood);
		depotgood.setDepotgoodsshelf(this);

		return depotgood;
	}

	public Depotgood removeDepotgood(Depotgood depotgood) {
		getDepotgoods().remove(depotgood);
		depotgood.setDepotgoodsshelf(null);

		return depotgood;
	}

	public List<Inst> getInsts() {
		return this.insts;
	}

	public void setInsts(List<Inst> insts) {
		this.insts = insts;
	}

	public Inst addInst(Inst inst) {
		getInsts().add(inst);
		inst.setDepotgoodsshelf(this);

		return inst;
	}

	public Inst removeInst(Inst inst) {
		getInsts().remove(inst);
		inst.setDepotgoodsshelf(null);

		return inst;
	}

	public List<Scheduleform> getScheduleforms() {
		return this.scheduleforms;
	}

	public void setScheduleforms(List<Scheduleform> scheduleforms) {
		this.scheduleforms = scheduleforms;
	}

	public Scheduleform addScheduleform(Scheduleform scheduleform) {
		getScheduleforms().add(scheduleform);
		scheduleform.setDepotgoodsshelf(this);

		return scheduleform;
	}

	public Scheduleform removeScheduleform(Scheduleform scheduleform) {
		getScheduleforms().remove(scheduleform);
		scheduleform.setDepotgoodsshelf(null);

		return scheduleform;
	}

}